package com.wavecoler.professor.objects;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;  
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;  
import javax.jdo.annotations.PrimaryKey; 
import javax.xml.bind.annotation.XmlRootElement;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@XmlRootElement
@SuppressWarnings("serial")
@PersistenceCapable
public class Problem implements Serializable {


	 public int getTotalObjectAvg() {
			return totalObjectAvg;
		}

		public void setTotalObjectAvg(int totalObjectAvg) {
			this.totalObjectAvg = totalObjectAvg;
		}
		
	public void setProblemId(Long problemId) {
		this.problemId = problemId;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public Course getCourse() {
		return course;
	}

	public void setCourse(Course course) {
		this.course = course;
	}

	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
    private String encodedKey;
	
	@Persistent
    @Extension(vendorName="datanucleus", key="gae.pk-id", value="true")
	private Long problemId;
	
	@Persistent
	private String name;
	
	@Persistent
	private String description;
	
	@Persistent
	private ArrayList<Word> glossary;
	
	@Persistent
	private int avgDuration;
	
	@Persistent
	private String urlPage;
	
	@Persistent
	private int difficultyLevel;
	
	private boolean active;
	
	private Course course;

	private int totalObjectAvg;
	
	public String getEncodedKey() {
		return encodedKey;
	}

	public Long getProblemId() {
		return problemId;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
	public ArrayList<Word> getGlossary() {
		return glossary;
	}
	public void setGlossary(ArrayList<Word> glossary) {
		this.glossary = glossary;
	}

	public void setAvgDuration(int avgDuration) {
		this.avgDuration = avgDuration;
	}

	public int getAvgDuration() {
		return avgDuration;
	}

	public void setUrlPage(String urlPage) {
		this.urlPage = urlPage;
	}

	public String getUrlPage() {
		return urlPage;
	}

	public void setDifficultyLevel(int difficultyLevel) {
		this.difficultyLevel = difficultyLevel;
	}

	public int getDifficultyLevel() {
		return difficultyLevel;
	}

}
